<?php

/**
 * File Name：GoodsDeleteModel.php
 * File Encoding：UTF-8
 * File New Time：2014-5-13 11:46:32
 * Author：水平凡
 * Mailbox：admin@abc3210.com
 */
class GoodsDeleteModel extends BaseModel {

    public function tableName() {
        return '{{goods_delete}}';
    }

    public function rules() {
        return array(
            array('cat_id', 'required', 'message' => '商品分类不能为空！'),
            array('product_id', 'required', 'message' => '商品ID不能为空！'),
            array('goods_name', 'required', 'message' => '商品标题不能为空！'),
            array('detail_url', 'required', 'message' => '商品地址不能为空！'),
            array('product_img', 'required', 'message' => '商品图片不能为空！'),
            array('listorder', 'default', 'value' => 0),
            array('p_price', 'required', 'message' => '商品原价不能为空！'),
            array('start_time', 'required', 'message' => '商品活动开始日期不能为空！'),
            array('end_time', 'required', 'message' => '商品活动结束日期不能为空！'),
            //无需验证字段
            array('brand_id,goods_brief,item_type,is_best,is_new,is_hot,level,click_url,shop_click_url,seller_credit_score,home_img,module_img,add_time,status,moduleid,commission_rate,promo_price,nick,nick_add,state,city,is_stock,stock,freeshipping,is_vip,sales,start_sales,update_sales_time,uid', 'safe'),
        );
    }

    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

}
